//
//  YCAlertView2.m
//  CustomByWindow
//
//  Created by tangkexiong on 16/1/28.
//  Copyright © 2016年 tangkexiong. All rights reserved.
//

#import "YCAlertView2.h"

#import <objc/runtime.h>

@implementation YCAlertView2

- (void)awakeFromNib {
    [super awakeFromNib];
}

- (void)show {
    self.windowLevel = UIWindowLevelAlert;
    self.frame = CGRectMake(0, 0, 375, 100);
    self.backgroundColor = [UIColor blackColor];
    self.alpha = 0.5f;
    
    [UIView animateWithDuration:0.3f animations:^{
        
    }];
}

- (void)becomeKeyWindow {
    [super becomeKeyWindow];
}

- (IBAction)cancelBtnClicked:(id)sender {
//    self.windowLevel = 0.f;
//    [[[[UIApplication sharedApplication] delegate] window] makeKeyAndVisible];
    self.hidden = YES;
}

@end
